<template>
    <el-table
            :data="data"
            style="width: 100%;margin-top: 30px"
            row-key="id"
            border
            default-expand-all
            :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
        <el-table-column
                prop="key"
                label="参数名称" show-overflow-tooltip>
        </el-table-column>
        <el-table-column
                prop="value"
                label="参数值" show-overflow-tooltip>
        </el-table-column>
        <el-table-column
                prop="required"
                label="是否必须" show-overflow-tooltip>
        </el-table-column>
        <el-table-column
                prop="example"
                label="示例" show-overflow-tooltip>
        </el-table-column>
        <el-table-column
                prop="description"
                label="备注" show-overflow-tooltip>
        </el-table-column>
    </el-table>
</template>

<script>
    export default {
        props: {
            tableData: {
                type: Array
            },
            /**
             * 类型 1头部信息 2请求参数 3返回参数
             */
            type: {
                type: Number
            }
        },
        data() {
            return {
                data: []
            }
        },
        mounted() {
            debugger
            console.log(this.tableData);
        },
        methods: {
            rowKey(row) {


            }
        }
    }
</script>

<style scoped>
    ::v-deep table {
        margin: 0px;
    }
</style>
